#include "littlefruit2.h"
#include"stats.h"
littlefruit2::littlefruit2()
{
    //图片插入
        l_fruit.load(l_path2);
        //位置
        l_x=0;
        l_y=0;
        l_ok=true;
        l_speed1=l_speed;
        //矩形设定
        l_rect.setWidth(l_fruit.width());
        l_rect.setHeight(l_fruit.height());
        l_rect.moveTo(l_x,l_y);
    }

    void littlefruit2::updateposition()
    {
          if(l_ok){
              return;
          }
          l_y+=l_speed1;
          l_rect.moveTo(l_x,l_y);
           //
          if(l_y>954+l_rect.height()){
              l_ok=true;
          }
}
